package com.example.work3.Fragment;

import android.content.Intent;
import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.work3.R;

import com.example.work3.denglu_Activity;
import com.example.work3.zhuce_two;

public class BlankFragment3 extends Fragment {
    private static final String ARG_PARAM1 = "title";

    private ImageView blank3_ig_touxiang;
    private TextView text_denglu_name;
    private TextView text_denglu_int;
    private Button blank3_bt_denglu;
    private Button blank3_bt_zhuce;

    // TODO: Rename and change types of parameters
    private String mParam1;
    public BlankFragment3() {

    }

    public static BlankFragment3 newInstance(String param1) {
        BlankFragment3 fragment = new BlankFragment3();
        Bundle args = new Bundle();
        args.putString(ARG_PARAM1, param1);
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (getArguments() != null) {
            mParam1 = getArguments().getString(ARG_PARAM1);
        }

    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_blank3, container, false);
        inirc9(view);
        return view;
    }

    private void inirc9(View view){
        blank3_ig_touxiang = view.findViewById(R.id.blank3_ig_touxiang);
        text_denglu_name = view.findViewById(R.id.text_denglu_name);
        text_denglu_int = view.findViewById(R.id.text_denglu_int);
        blank3_bt_denglu = view.findViewById(R.id.blank3_bt_denglu);
        blank3_bt_zhuce = view.findViewById(R.id.blank3_bt_zhuce);

    }


    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        inirc9(getView());
        blank3_bt_zhuce.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent zhuce = new Intent(getActivity(),zhuce_two.class);
                startActivity(zhuce);
            }
        });


        blank3_bt_denglu.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent denglu = new Intent(getActivity(), denglu_Activity.class);
                startActivity(denglu);
            }
        });
    }
}